﻿

@{
    ViewBag.Title = "UserInfo";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="~/Content/jquery-3.3.1.min.js"></script>
    <script src="~/Content/jquery-ui.js"></script>
    <script src="~/Content/userinfo.js"></script>
    <link href="~/Content/Userinfor.css" rel="stylesheet" />
</head>
<body>
    <div class="content">
        <!-- 第一行导航栏 -->
        <ul class="top-title">
            <li class="top-content">
                <a href="#">个人资料</a>
            </li>
            <li class="top-content">
                <a href="#">修改头像</a>
            </li>
            <li class="top-content">
                <a href="#">隐私设置</a>
            </li>
            <li class="top-content">
                <a href="#">个性设置</a>
            </li>
        </ul>
        <!-- 第二行导航栏 -->
        <ul class="active-li">
            <li class="currt"><a href="#">基本信息</a></li>
            <li>
                <span>|</span>
                <a href="#">密码修改</a>
            </li>
            <li>
                <span>|</span>
                <a href="#">教育信息</a>
            </li>
            <li>
                <span>|</span>
                <a href="#">职业信息</a>
            </li>
            <li>
                <span>|</span>
                <a href="#">个人标签</a>
            </li>
            <li>
                <span>|</span>
                <a href="#">个性域名</a>
            </li>
        </ul>
        <!-- 第二行导航栏所对应的内容 -->
        <div class="content-tab">
            <!-- 用户基本信息 -->
            <div class="active-tab active-show">
                <form name="UserInfo" action="AlterUserInfo">
                    <div class="active-box">
                        <span class="active-box-title">登录名：</span>
                        <label id="loginname">@ViewBag.user.U_Email</label>
                    </div>
                    <div class="active-box">
                        <span class="active-box-titles">*</span>
                        <span class="active-box-title">昵称：</span>
                        <input type="text" name="user_U_Nick" class="textbox-one" value="@ViewBag.user.U_Nick">
                    </div>
                    <div class="active-box-long">
                        <span class="active-box-title">真实姓名：</span>
                        <input type="text" class="textbox-one" name="UserInfo_realname" value="@ViewBag.UserInfo.UserInfo_realname">
                        <select style="float: right;margin-top: 30px; height: 25px;border:0;color: #1d658f;font-size: 15px;">
                            <option value="volvo">允许所有人可见</option>
                            <option value="saab">仅好友可见</option>
                            <option value="saab">仅自己可见</option>
                        </select>
                    </div>
                    <div class="active-box">
                        <span class="active-box-titles">*</span>
                        <span class="active-box-title">所在地：</span>
                        <select id="province" name="province" onChange="fillCity()" style="height: 30px;"></select>
                        &nbsp;&nbsp;
                        <select id="city" name="city" style="height: 30px;"></select>
                    </div>
                    <div class="active-box">
                        <span class="active-box-titles">*</span>
                        <span class="active-box-title" style="float: left;">性别：</span>
                        @*<form action="" method="GET" style="float: left;">*@
                        @if (ViewBag.UserInfo.UserInfo_Sex == "男")
                        {
                            <span>
                                <input type="radio" name="Fruit" checked value="男">男
                                <input type="radio" name="Fruit" value="女">女
                            </span>
                        }
                        else
                        {
                            <span>
                                <input type="radio" name="Fruit" value="男">男
                                <input type="radio" name="Fruit" checked value="女">女
                            </span>

                        }

                        @*</form>*@
                    </div>
                    <div class="active-box-long">
                        <span class="active-box-title">生日：</span>
                        <select style="float: right; height: 25px; margin-top: 25px;border:0;color: #1d658f;font-size: 15px;">
                            <option value="volvo">公开，完整显示</option>
                            <option value="saab">公开，部分显示</option>
                            <option value="saab">不公开</option>
                        </select>
                        @*<form name="reg_testdate">*@
                        <select name="YYYY" onchange="YYYYDD(this.value)" style="height: 30px;">
                            <option value="">请选择 年</option>
                        </select>
                        <select name="MM" onchange="MMDD(this.value)" style="height: 30px;">
                            <option value="">选择 月</option>
                        </select>
                        <select name="DD" style="height: 30px;">
                            <option value="">选择 日</option>
                        </select>
                        @*</form>*@
                    </div>
                    @*<div class="active-box-long">
                            <span class="active-box-title">博客地址：</span>
                            <input type="text" class="textbox-one" name="Boxtitle" value="@ViewBag.user.U_Email">
                            <select style="float: right; height: 25px; margin-top: 25px;border:0;color: #1d658f;font-size: 15px;">
                                <option value="volvo">允许所有人可见</option>
                                <option value="saab">仅好友可见</option>
                                <option value="saab">仅自己可见</option>
                            </select>
                        </div>*@
                    <input type="submit" value="提交修改" style="float: right; height: 40px; width: 120px;background-color: seagreen;border-radius: 7px;color: white;">

                </form>

            </div>
            <!-- 修改密码 -->
            <div class="active-tab">
                <form action="AlterPwd">
                    <div>
                        <h3>修改登录密码</h3>
                        <hr style="border:1px dashed #d8d8d8">
                    </div>
                    <div class="active-box-long">
                        <span class="active-box-title">旧密码：</span>
                        <input type="text" class="textbox-one" name="OldPwd">
                    </div>
                    <div class="active-box-long">
                        <span class="active-box-title">新密码：</span>
                        <span class="tbl-txt"><input id="pass" class="textbox-one" name="NewPwd" type="password" /></span>
                        <div id="level" class="pw-strength">
                            <div class="pw-bar"></div>
                            <div class="pw-bar-on"></div>
                            <div class="pw-txt">
                            </div>
                        </div>
                        <script type="text/javascript">
                            //密码强度
                            $(function () {
                                $('#pass').keyup(function () {
                                    var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
                                    var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");
                                    var enoughRegex = new RegExp("(?=.{6,}).*", "g");
                                    if (false == enoughRegex.test($(this).val())) {
                                        $('#level').removeClass('pw-weak');
                                        $('#level').removeClass('pw-medium');
                                        $('#level').removeClass('pw-strong');
                                        $('#level').addClass(' pw-defule');
                                        //密码小于六位的时候，密码强度图片都为灰色
                                    }
                                    else if (strongRegex.test($(this).val())) {
                                        $('#level').removeClass('pw-weak');
                                        $('#level').removeClass('pw-medium');
                                        $('#level').removeClass('pw-strong');
                                        $('#level').addClass(' pw-strong');
                                        //密码为八位及以上并且字母数字特殊字符三项都包括,强度最强
                                    }
                                    else if (mediumRegex.test($(this).val())) {
                                        $('#level').removeClass('pw-weak');
                                        $('#level').removeClass('pw-medium');
                                        $('#level').removeClass('pw-strong');
                                        $('#level').addClass(' pw-medium');
                                        //密码为七位及以上并且字母、数字、特殊字符三项中有两项，强度是中等
                                    }
                                    else {
                                        $('#level').removeClass('pw-weak');
                                        $('#level').removeClass('pw-medium');
                                        $('#level').removeClass('pw-strong');
                                        $('#level').addClass('pw-weak');
                                        //如果密码为6为及以下，就算字母、数字、特殊字符三项都包括，强度也是弱的
                                    }
                                    return true;
                                });
                            })
                        </script>
                    </div>
                    <div class="active-box">
                        <span class="active-box-title">再次确认：</span>
                        <input type="password" name="NewPwdAgin" class="textbox-one">
                    </div>
                    <input type="submit" value="提交修改" style="float: right; height: 40px; width: 120px; background-color: seagreen;border-radius: 7px;color: white;">
                </form>

            </div>
            <!-- 教育信息 -->
            <div class="active-tab">
                <form action="AlterEdu" method="post">
                    <div>
                        <h3>添加教育信息</h3>
                        <hr style="border:1px dashed #d8d8d8">
                    </div>
                    <div class="active-box">
                        <span class="active-box-titles">*</span>
                        <span class="active-box-title">学校名称：</span>
                        <input type="text" name="UserInfo_SchoolName" value="@ViewBag.UserInfo.UserInfo_SchoolName" class="textbox-one">
                    </div>
                    <div class="active-box">
                        <span class="active-box-title">院系：</span>
                        <input type="text" name="UserInfo_Department" value="@ViewBag.UserInfo.UserInfo_Department" class="textbox-one">
                    </div>
                    <input type="submit" value="提交修改" style="float: right; height: 40px; width: 120px; background-color: seagreen;border-radius: 7px;color: white;">
                </form>

            </div>
            <!-- 职业信息 -->
            <div class="active-tab">
                <form action="AlterPro">
                    <div>
                        <h3>添加职业信息</h3>
                        <hr style="border:1px dashed #d8d8d8">
                    </div>
                    <div class="active-box">
                        <span class="active-box-title">详细地址：</span>
                        <input type="text" class="textbox-one" value="@ViewBag.UserInfo.UserInfo_Location" name="UserInfo_Location">
                    </div>
                    <div class="active-box">
                        <span class="active-box-titles">*</span>
                        <span class="active-box-title">单位名称：</span>
                        <input type="text" class="textbox-one" value="@ViewBag.UserInfo.UserInfo_CompanyName" name="UserInfo_CompanyName">
                    </div>
                    <div class="active-box">
                        <span class="active-box-title">部门/职位：</span>
                        <input type="text" class="textbox-one" value="@ViewBag.UserInfo.UserInfo_DepartmentPosition" name="UserInfo_DepartmentPosition">
                    </div>
                    <input type="submit" value="提交修改" style="float: right; height: 40px; width: 120px; background-color: seagreen;border-radius: 7px;color: white;">
                </form>

            </div>
            <!-- 个人标签 -->
            <div class="active-tab">
                <div>
                    <h3>添加个人标签</h3>
                    <hr style="border:1px dashed #d8d8d8">
                </div>
            </div>
            <!-- 个性域名 -->
            <div class="active-tab">
                <div>
                    <h3>添加个性域名</h3>
                    <hr style="border:1px dashed #d8d8d8">
                </div>
                <div class="active-box">
                    <span class="active-box-title">个性域名：</span>
                    <input type="text" class="textbox-one">
                </div>
                <input type="submit" value="提交修改" style="float: right; height: 40px; width: 120px; background-color: seagreen;border-radius: 7px;color: white;">
            </div>
        </div>
    </div>
</body>
</html>